package com.rentong.wx.cust.controller;

import com.rentong.common.R;
import com.rentong.wx.cust.domain.CustSuggestionEntity;
import com.rentong.wx.cust.service.CustSuggestionService;
import com.rentong.wx.utils.WxApiUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * 
 *
 * @author zhangle
 * @email 459343178@qq.com
 * @date 2024-12-24 14:42:31
 */
@RestController
public class CustSuggestionController {

    @Autowired
    private CustSuggestionService custSuggestionService;

    /*
     *20、意见反馈
     *
     * */
    @PostMapping("/wx/cust/insertFeedback")
    public R insertFeedback(CustSuggestionEntity custSuggestionEntity, HttpServletRequest request) throws Exception{
        custSuggestionEntity.setCustId(WxApiUtil.getCurrentCustId(request));

        int i = custSuggestionService.insertFeedback(custSuggestionEntity);

        if(i > 0){
            return R.success("操作成功");
        }else {
            return R.error("操作失败");
        }
    }




}
